import Vue from 'vue'
import Router from 'vue-router'

import Main from '../views/Main'
import Login from '../views/Login'

import UserList from '../views/user/List'
import UserProfile from '../views/user/proFile'
import NotFound from '../views/NotFound'
import Test from "../views/test/pass-by-value_test/test"
import Adduser from "../views/user/adduser";
import Menu from "../views/system/Menu/Menu";
import Menu2 from "../views/test/Menu_Example/menu";
import AddMenu from "../views/system/Menu/updateMenu";
import Menu_config from "../views/system/Menu/Menu_config";
import AES from "../views/test/AES";
import MusicIndex from "../views/music/musicIndex";


Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: Login
    },
    {
      path: '/menu/:name',
      component: Menu,
      props: true,
      children: [
        {
          path: '/user/profile/:id/:name',
          name: 'UserProfile',
          component: UserProfile,
          props: true
        },
        /*列表测试*/
        {
          path: '/user/list',
          component: UserList
        },
        /*AES加密解密*/
        {
          path: '/AES',
          component: AES
        },
        /*测试*/
        {
          path: '/test',
          component: Test
        },
        /*菜单设置*/
        {
          path: '/menu/Menu_config',
          component: Menu_config
        },


      ]
    },
    {
      path: '/music/musicIndex',
      component: MusicIndex
    },
    {
      path: '/goHome',
      redirect: '/main'
    },
    {
      path: '*',
      component: NotFound
    },
    {
      path: '/adduser',
      component: Adduser
    },
    {
      path: '/Menu',
      component: Menu
    },
    {
      path: '/menu2',
      component: Menu2
    },
    {
      path: '/addMenu',
      component: AddMenu
    },


    //放在外面或放里面
    /*{
      path: '/test',
      component: Test
    },*/
  ]
})
